package com.demo.web;

import org.springframework.web.bind.annotation.*;

/**
 * @author yexi
 */
@RestController
@RequestMapping("/api")
public class ServerController {

    @PostMapping("/test1")
    public Integer test1(Integer a, Integer b) {
        return a + b;
    }

    @GetMapping("/test2")
    public Integer test2Get() {
        throw new RuntimeException();
    }

    @RequestMapping(value = "/test3/{param}")
    public String test3() {
        return "发到这里来了";
    }

    @RequestMapping(value = "/test3/aim", method = RequestMethod.POST)
    public String test3aim() {
        return "精确发到了这里";
    }


}
